package com.backend.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @Id
    protected Integer id;
    protected String name;
    protected String email;
    protected String password;

    public String toFront() {
        return String.format(
                "{" +
                        "\"name\":\"%s\"," +
                        "\"id\":\"%s\"" +
                        "\"email\":\"%s\"" +
                        "}", name, id,email);
    }
}
